﻿using System.Reflection;

namespace _76_C_反射构造函数_有参_无参_私有构造函数_
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Assembly assembly = Assembly.LoadFrom("TestClassLibrary.dll");
            //加载类型  程序集名称.类型命名
            Type type = assembly.GetType("TestClassLibrary.Student");

            //实例化对象
            Object obj = Activator.CreateInstance(type);
            //实例化对象
            Object obj1 = Activator.CreateInstance(type,12);
            //实例化对象
            Object obj2 = Activator.CreateInstance(type,"test", 12);
        }
    }
}
